package com.linwen.excise.niuke._40;

import java.util.Scanner;

/**
 * @author wlw
 * @date 2023/3/12 10:50 PM
 */
public class _38求小球落地5次后所经历的路程和第5次反弹的高度 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        double allLength = 0.0;
        double fiveHigth = n;
        for (int i = 0; i < 5; i++) {
            if(i==0){
                allLength += fiveHigth;
            }else{
                allLength += fiveHigth*2;
            }

            fiveHigth /= 2;
        }
        System.out.println(allLength);
        System.out.println(fiveHigth);
    }
}
